package javabook.ch05;
public class Jv_5_4 {
	
	public static void swl(int x, int y){
		int temp;
		temp = x;
		x = y;
		y = temp;
		System.out.println("swp x = " + x + ", new y = " + y);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("***** call-by-value******");
		
		//객체를 생성...
		//객체.x = 3;
		//sw1.객체(객체.x, 객체. y)

		int x = 20;
		int y = 50;
		
		System.out.println("old x = " + x + ", old y = " + y);
		
		swl(x,y);
		
		System.out.println("old x = " + x + ", old y = " + y);
	}
}

